INSERT  INTO `sys_menu`(`parent_id`,`tree_path`,`name`,`type`,`path`,`component`,`perm`,`visible`,`sort`,`icon`,`redirect`,`create_time`,`update_time`) VALUES
(292,'0,292','${table.comment!}',1,'${table.entityPath?replace("sys","")?uncap_first}','system/${table.entityPath?replace("sys","")?uncap_first}/index',NULL,1,2,'document',NULL,SYSDATE(),SYSDATE());

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

INSERT  INTO `sys_menu`(`parent_id`,`tree_path`,`name`,`type`,`path`,`component`,`perm`,`visible`,`sort`,`icon`,`redirect`,`create_time`,`update_time`) VALUES
(@parentId,CONCAT('0,1,',@parentId),'新增或修改${table.comment!}',4,'',NULL,'sys:${table.entityPath?replace("sys","")?uncap_first}:save',1,1,'',NULL,SYSDATE(),SYSDATE()),
(@parentId,CONCAT('0,1,',@parentId),'删除${table.comment!}',4,'',NULL,'sys:${table.entityPath?replace("sys","")?uncap_first}:delete',1,2,'',NULL,SYSDATE(),SYSDATE()),
(@parentId,CONCAT('0,1,',@parentId),'导入${table.comment!}',4,'',NULL,'sys:${table.entityPath?replace("sys","")?uncap_first}:import',1,3,'',NULL,SYSDATE(),SYSDATE()),
(@parentId,CONCAT('0,1,',@parentId),'导出${table.comment!}',4,'',NULL,'sys:${table.entityPath?replace("sys","")?uncap_first}:export',1,4,'',NULL,SYSDATE(),SYSDATE());

INSERT INTO `sys_dict_type`(`name`, `code`, `status`, `remark`, `create_time`, `update_time`) VALUES ('${table.comment}', '${entity?uncap_first}', 1, '${table.name}_', NOW(), NOW());

<#list table.fields as field>
    <#if field.propertyName != "id" && field.propertyName != "createTime" && field.propertyName != "updateTime">
    <#-- 普通字段 -->
        INSERT INTO `sys_dict`(`type_code`, `name`, `value`, `sort`, `status`, `defaulted`, `remark`, `create_time`, `update_time`) VALUES ('${entity?uncap_first}', '${field.comment}', '${field.annotationColumnName}', ${field_index + 1}, 1, 0, NULL, NOW(), NOW());
    </#if>
</#list>